package CfengMiddleWare.api.enums;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author Cfeng
 * @date 2022/9/13
 * 返回的状态码的信息，类比HttpStatus
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
public class StatusCode {

    private Integer code;

    private String msg;

    public static final StatusCode SUCCESS = new StatusCode(0,"成功");
    public static final StatusCode FAILED = new StatusCode(-1,"失败");
    public static final StatusCode INVALID_PARAMS = new StatusCode(201,"非法参数");
    public static final StatusCode INVALID_GRANT_TYPE = new StatusCode(202,"非法授权类型");
}
